package com.zjut.zs.confirm.manager;

import java.util.List;

import javax.annotation.Resource;

import com.zjut.an.util.module.PageModule;
import com.zjut.zs.cj.dao.ZsCj;
import com.zjut.zs.confirm.dao.ZsConfirm;
import com.zjut.zs.confirm.dao.ZsConfirmDAO;
import com.zjut.zs.user.dao.ZsUser;


public class ZsConfirmManager {

	@Resource(name = "ZsConfirmDAO")
	private ZsConfirmDAO dao;
	
	public void addData(ZsConfirm obj) {	
		dao.save(obj);
	}
	
	public void updateData(ZsConfirm obj) {
		dao.update(obj);
	}
	
	public void deleteData(ZsConfirm obj) {
		dao.delete(obj);
	}

	public void deleteDatas(List<ZsConfirm> objlist) {
		for (ZsConfirm ZsConfirm : objlist) {
			dao.delete(ZsConfirm);
		}
	}
	
	public PageModule getDataByInstance (int pageNumber,int pageSize, String sort, String order, ZsConfirm obj) {
		return dao.findByInstance(pageNumber, pageSize, sort, order, obj);
	}
	
	public List getDatas() {
		return dao.findAll();
	}

	public ZsConfirm getData(int objId) {
		return dao.findById(objId);
	}
}
